<template>
    <div class="content bei-dou-sensor-dialog">
        <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
            <el-menu-item v-for="(item,i) in sensorArr" :index="item.type" :key="item.name + i">{{item.name}}
            </el-menu-item>
        </el-menu>
        <div class="bei-dou-sensor-chart-box">

            <div class="chart-box-head hBox vh_content_between vh_items_start">
                <el-date-picker
                        v-model="value1"
                        class="mr30"
                        type="datetimerange"
                        :picker-options="pickerOptions"
                        size="large"
                        range-separator="至"
                        start-placeholder="开始日期"
                        end-placeholder="结束日期"
                        align="right">
                </el-date-picker>
                <div class="button-box">
                    <div @click="dayTimeChange('day')" :class="{'active':buttonIndex==='accordingDay'}">按天排列</div>
                    <div @click="dayTimeChange('time')" :class="{'active':buttonIndex==='accordingTime'}">按时排列</div>
                </div>

            </div>

            <div class="chart-container">
                <chart v-for="(item,i) in sensorArr" :key="item.type + i" v-show="activeIndex===item.type"
                       :auto-resize='true' :options='optionsGroup[i]'></chart>
            </div>
        </div>
    </div>
</template>

<script>
import moment from 'moment';
import {shuffle, cloneDeep} from '../../utils/function-list';

var xData = function () {
    var data = [];
    for (var i = 1; i < 31; i++) {
        data.push(i);
    }
    return data;
}();

let datadd = [];
for (let i = 0; i < 30; i++) {
    datadd.push(Math.floor(Math.random() * 30));
}

var fSize = 18;
var color = 'rgba(30,44,65,1)';
let scatterData = [
    [-0.0041, -0.002399],
    [-0.0042, -0.002199],
    [-0.0043, -0.002499],
    [-0.004399, -0.002699],
    [-0.004399, -0.002599],
    [-0.0046, -0.002999],
    [-0.0046, -0.002899],
    [-0.004399, -0.002699],
    [-0.0043, -0.002799],
    [-0.0046, -0.002799],
    [-0.0048, -0.003299],
    [-0.004399, -0.003299],
    [-0.0039, -0.003199],
    [-0.0038, -0.002799],
    [-0.004, -0.002999],
    [-0.004, -0.003299],
    [-0.0042, -0.003199],
    [-0.004, -0.002999],
    [-0.0038, -0.002899],
    [-0.004, -0.002499],
    [-0.0042, -0.002499],
    [-0.0043, -0.002399],
    [-0.004399, -0.002199],
    [-0.0041, -0.001899],
    [-0.004, -0.002299],
    [-0.004, -0.002599],
    [-0.0042, -0.002999],
    [-0.0041, -0.003199],
    [-0.004, -0.003299],
    [-0.0041, -0.003199],
    [-0.0042, -0.003199],
    [-0.0042, -0.003199],
    [-0.004399, -0.002899],
    [-0.004399, -0.002899],
    [-0.004, -0.002899],
    [-0.0037, -0.002399],
    [-0.0034, -0.001999],
    [-0.003299, -0.001499],
    [-0.0035, -0.001899],
    [-0.0035, -0.002099],
    [-0.003599, -0.002199],
    [-0.0034, -0.001999],
    [-0.0035, -0.001999],
    [-0.0035, -0.002199],
    [-0.0037, -0.002499],
    [-0.0038, -0.002899],
    [-0.004, -0.003199],
    [-0.0041, -0.003099],
    [-0.0041, -0.003199],
    [-0.0041, -0.003599],
    [-0.0041, -0.003699],
    [-0.0041, -0.003299],
    [-0.0041, -0.003099],
    [-0.0043, -0.002899],
    [-0.0041, -0.002699],
    [-0.0039, -0.002599],
    [-0.0038, -0.002399],
    [-0.0035, -0.001999],
    [-0.0038, -0.001299],
    [-0.0039, -0.001099],
    [-0.0039, -0.000699],
    [-0.0038, -0.001299],
    [-0.0035, -0.001699],
    [-0.0031, -0.001699],
    [-0.0028, -0.001999],
    [-0.0028, -0.002399],
    [-0.0031, -0.002499],
    [-0.0027, -0.002799],
    [-0.0027, -0.002999],
    [-0.0032, -0.003099],
    [-0.0032, -0.002499],
    [-0.0031, -0.002399],
    [-0.0031, -0.001899],
    [-0.0034, -0.001699],
    [-0.0035, -0.001499],
    [-0.003599, -0.001599],
    [-0.0037, -0.001999],
    [-0.0037, -0.002199],
    [-0.0035, -0.002499],
    [-0.0034, -0.002499],
    [-0.0035, -0.002199],
    [-0.003599, -0.001799],
    [-0.0035, -0.001799],
    [-0.0026, -0.001799],
    [-0.002499, -0.001399],
    [-0.002499, -0.001299],
    [-0.0024, -0.001399],
    [-0.002199, -0.001599],
    [-0.0026, -0.001699],
    [-0.0028, -0.002399],
    [-0.0024, -0.002599],
    [-0.0024, -0.002899],
    [-0.0029, -0.003099],
    [-0.0031, -0.002799],
    [-0.003, -0.002299],
    [-0.0029, -0.001899],
    [-0.003, -0.001699],
    [-0.003, -0.002299],
    [-0.0031, -0.002399],
    [-0.0034, -0.002299],
    [-0.003599, -0.002299],
    [-0.0034, -0.002399],
    [-0.003299, -0.002499],
    [-0.0035, -0.002799],
    [-0.0038, -0.002899],
    [-0.0037, -0.003099],
    [-0.0029, -0.002899],
    [-0.0023, -0.002399],
    [-0.0021, -0.002299],
    [-0.002199, -0.002899],
    [-0.0024, -0.003299],
    [-0.002499, -0.003199],
    [-0.002199, -0.003499],
    [-0.0019, -0.003699],
    [-0.002199, -0.003299],
    [-0.0023, -0.003099],
    [-0.0027, -0.003399],
    [-0.003, -0.003299],
    [-0.0027, -0.003499],
    [-0.0029, -0.003699],
    [-0.0031, -0.003899],
    [-0.0035, -0.003999],
    [-0.0032, -0.004399],
    [-0.0035, -0.004499],
    [-0.003599, -0.004299],
    [-0.0038, -0.004199],
    [-0.0041, -0.003799],
    [-0.0037, -0.003999],
    [-0.0032, -0.004299],
    [-0.0028, -0.003899],
    [-0.0027, -0.003499],
    [-0.0031, -0.003299],
    [-0.0032, -0.003699],
    [-0.0029, -0.003899],
    [-0.0026, -0.004299],
    [-0.0024, -0.004099],
    [-0.0026, -0.003499],
    [-0.0026, -0.003199],
    [-0.0031, -0.003099],
    [-0.003299, -0.003299],
    [-0.0034, -0.003399],
    [-0.003599, -0.003299],
    [-0.003599, -0.003299],
    [-0.004, -0.003399],
    [-0.0039, -0.003899],
    [-0.0039, -0.004099],
    [-0.004, -0.004099],
    [-0.0046, -0.003799],
    [-0.004399, -0.004399],
    [-0.0041, -0.004299],
    [-0.0039, -0.003499],
    [-0.0045, -0.002599],
    [-0.0046, -0.002099],
    [-0.0046, -0.001699],
    [-0.0041, -0.002099],
    [-0.003599, -0.002099],
    [-0.003299, -0.001499],
    [-0.003, -0.001399],
    [-0.0032, -0.001399],
    [-0.0031, -0.001499],
    [-0.0027, -0.001899],
    [-0.0028, -0.002299],
    [-0.003, -0.002199],
    [-0.0032, -0.002199],
    [-0.0034, -0.002399],
    [-0.003599, -0.002599],
    [-0.0039, -0.002699],
    [-0.0039, -0.002599],
    [-0.0039, -0.003099],
    [-0.0043, -0.003299],
    [-0.004, -0.003699],
    [-0.003299, -0.002799],
    [-0.003, -0.002199],
    [-0.003, -0.001999],
    [-0.0029, -0.001799],
    [-0.0023, -0.001899],
    [-0.0021, -0.001799],
    [-0.002, -0.001999],
    [-0.0016, -0.002399],
    [-0.0016, -0.002499],
    [-0.002199, -0.003399],
    [-0.0021, -0.003699],
    [-0.0017, -0.003699],
    [-0.0016, -0.004099],
    [-0.0021, -0.003799],
    [-0.002499, -0.003299],
    [-0.0029, -0.002499],
    [-0.0029, -0.001899],
    [-0.0029, -0.001699],
    [-0.0028, -0.002099],
    [-0.0031, -0.001999],
    [-0.003299, -0.002399],
    [-0.003599, -0.002299],
    [-0.0034, -0.002099],
    [-0.0027, -0.002199],
    [-0.0029, -0.002499],
    [-0.003299, -0.002799],
    [-0.003299, -0.003199],
    [-0.0027, -0.002999],
    [-0.0023, -0.002499],
    [-0.0026, -0.002399],
    [-0.0027, -0.003099],
    [-0.0028, -0.003399],
    [-0.003, -0.003699],
    [-0.0028, -0.003899],
    [-0.0027, -0.003999],
    [-0.0027, -0.003399],
    [-0.003, -0.003099],
    [-0.003599, -0.003399],
    [-0.0043, -0.003399],
    [-0.0043, -0.003399],
    [-0.0023, -0.007399],
    [-0.0027, -0.004099],
    [-0.0026, -0.003299],
    [-0.002499, -0.002399],
    [-0.0027, -0.002899],
    [-0.0032, -0.003499],
    [-0.0032, -0.003499],
    [-0.003299, -0.003799],
    [-0.002199, -0.005399],
    [-0.002499, -0.004599],
    [-0.002499, -0.003799],
    [-0.0024, -0.003399],
    [-0.0029, -0.003399],
    [-0.0029, -0.003499],
    [-0.0037, -0.003599],
    [-0.0041, -0.003799],
    [-0.0043, -0.003799],
    [-0.0045, -0.003799],
    [-0.0046, -0.003799],
    [-0.0049, -0.003799],
    [-0.0046, -0.003899],
    [-0.0047, -0.003999],
    [-0.0049, -0.003599],
    [-0.004399, -0.003699],
    [-0.0043, -0.003499],
    [-0.0039, -0.003099],
    [-0.0039, -0.002599],
    [-0.0045, -0.002199],
    [-0.004399, -0.001999],
    [-0.0039, -0.001499],
    [-0.0035, -0.001599],
    [-0.0031, -0.001499],
    [-0.0027, -0.001099],
    [-0.0027, -0.001399],
    [-0.0035, -0.001399],
    [-0.0034, -0.001599],
    [-0.0029, -0.001999],
    [-0.003299, -0.002499],
    [-0.0037, -0.002199],
    [-0.0037, -0.002299],
    [-0.003299, -0.002099],
    [-0.0031, -0.001999],
    [-0.0028, -0.001699],
    [-0.0024, -0.001799],
    [-0.0021, -0.001999],
    [-0.0023, -0.002199],
    [-0.002499, -0.002499],
    [-0.0023, -0.002399],
    [-0.002, -0.002099],
    [-0.0027, -0.001799],
    [-0.0032, -0.001499],
    [-0.0027, -0.001599],
    [-0.002, -0.001199],
    [-0.002, -0.000899],
    [-0.0017, -0.000799],
    [-0.0013, -0.001199],
    [-0.0015, -0.001499],
    [-0.0019, -0.001599],
    [-0.0017, -0.002299],
    [-0.0008, -0.002599],
    [-0.001099, -0.002599],
    [-0.0015, -0.002399],
    [-0.001399, -0.001899],
    [-0.0012, -0.001499],
    [-0.0009, -0.000899],
    [-0.001099, -0.001599],
    [-0.001, -0.002099],
    [-0.001099, -0.001799],
    [-0.0017, -0.001899],
    [-0.0019, -0.002199],
    [-0.0016, -0.002499],
    [-0.0018, -0.002899],
    [-0.0027, -0.003499],
    [-0.0029, -0.003399],
    [-0.0019, -0.003399],
    [-0.001099, -0.003299],
    [-0.0009, -0.003299],
    [-0.0006, -0.003599],
    [-0.0007, -0.004099],
    [-0.001099, -0.004299],
    [-0.0012, -0.004499],
    [-0.0009, -0.004699],
    [-0.0009, -0.004599],
    [-0.0017, -0.004199],
    [-0.002, -0.004199],
    [-0.0024, -0.004399],
    [-0.002, -0.003399],
    [-0.0017, -0.003399],
    [-0.002, -0.003799],
    [-0.002, -0.003999],
    [-0.0024, -0.003699],
    [-0.0023, -0.003699],
    [-0.0021, -0.003599],
    [-0.0024, -0.003599],
    [-0.003, -0.003799],
    [-0.0037, -0.004299],
    [-0.0038, -0.004399],
    [-0.0026, -0.004799],
    [-0.0021, -0.004499],
    [-0.001399, -0.004299],
    [-0.002199, -0.003899],
    [-0.0026, -0.003799],
    [-0.0024, -0.003799],
    [-0.002, -0.004099],
    [-0.0015, -0.004299],
    [-0.0019, -0.003299],
    [-0.0023, -0.002899],
    [-0.0023, -0.002799],
    [-0.0028, -0.003299],
    [-0.0061, -0.005799],
    [-0.0079, -0.005399],
    [-0.0059, -0.004399],
    [-0.0053, -0.003999],
    [-0.0052, -0.004799],
    [-0.0039, -0.004699],
    [-0.0031, -0.004399],
    [-0.0031, -0.004199],
    [-0.003599, -0.004199],
    [-0.0035, -0.003899],
    [-0.0031, -0.004699],
    [-0.0031, -0.004999],
    [-0.002499, -0.004399],
    [-0.0032, -0.003399],
    [-0.0042, -0.002999],
    [-0.0045, -0.002799],
    [-0.004399, -0.002699],
    [-0.004, -0.002999],
    [-0.0038, -0.002699],
    [-0.0031, -0.001999],
    [-0.0029, -0.001499],
    [-0.0037, -0.001499],
    [-0.003, -0.001799],
    [-0.0026, -0.002099],
    [-0.0028, -0.002599],
    [-0.0028, -0.002099],
    [-0.003299, -0.002399],
    [-0.0038, -0.002599],
    [-0.0045, -0.002699],
    [-0.0048, -0.002899],
    [-0.0046, -0.003199],
    [-0.0046, -0.003399],
    [-0.0048, -0.003599],
    [-0.0046, -0.003399],
    [-0.0043, -0.002999],
    [-0.0032, -0.001499],
    [-0.003299, -0.000899],
    [-0.0034, -0.000799],
    [-0.0021, -0.000999],
    [-0.0013, -0.001199],
    [-0.001399, -0.001199],
    [-0.001099, -0.001499],
    [-0.0009, -0.002099],
    [-0.0012, -0.003199],
    [-0.0017, -0.003599],
    [-0.001099, -0.004099],
    [-0.001099, -0.004199],
    [-0.0017, -0.003999],
    [-0.002499, -0.003699],
    [-0.0029, -0.002799],
    [-0.0028, -0.001899],
    [-0.0023, -0.001399],
    [-0.002199, -0.001799],
    [-0.002199, -0.002499],
    [-0.0024, -0.002499],
    [-0.002499, -0.002699],
    [-0.0023, -0.002499],
    [-0.0016, -0.002199],
    [-0.0016, -0.002999],
    [-0.002499, -0.003599],
    [-0.0028, -0.004099],
    [-0.002199, -0.004299],
    [-0.002, -0.003999],
    [-0.0024, -0.004199],
    [-0.0024, -0.004699],
    [-0.0024, -0.005199],
    [-0.002499, -0.005399],
    [-0.002199, -0.005199],
    [-0.0019, -0.005199],
    [-0.0021, -0.004399],
    [-0.0026, -0.003999],
    [-0.0029, -0.003899],
    [-0.0032, -0.003499],
    [-0.0029, -0.003299],
    [-0.0029, -0.004499],
    [-0.003299, -0.004699],
    [-0.003599, -0.004999],
    [-0.0039, -0.004699],
    [-0.0039, -0.004699],
    [-0.003599, -0.004699],
    [-0.003599, -0.004299],
    [-0.0039, -0.004499],
    [-0.0045, -0.003899],
    [-0.0042, -0.003299],
    [-0.0038, -0.003099],
    [-0.0035, -0.002799],
    [-0.0028, -0.002699],
    [-0.0027, -0.002399],
    [-0.0029, -0.002899],
    [-0.002499, -0.002999],
    [-0.002, -0.003199],
    [-0.0016, -0.003199],
    [-0.0015, -0.002699],
    [-0.0017, -0.002699],
    [-0.002199, -0.002599],
    [-0.0032, -0.003099],
    [-0.0038, -0.003799],
    [-0.0043, -0.003799],
    [-0.004399, -0.003699],
    [-0.0048, -0.003799],
    [-0.005, -0.004099],
    [-0.0052, -0.003999],
    [-0.0054, -0.003999],
    [-0.005, -0.004199],
    [-0.005, -0.003699],
    [-0.0049, -0.003499],
    [-0.0049, -0.003899],
    [-0.0051, -0.004099],
    [-0.0048, -0.003699],
    [-0.0054, -0.003499],
    [-0.0054, -0.003599],
    [-0.0048, -0.002999],
    [-0.0046, -0.002999],
    [-0.0042, -0.003099],
    [-0.0037, -0.002899],
    [-0.0032, -0.003099],
    [-0.0032, -0.002899],
    [-0.0042, -0.002299],
    [-0.0038, -0.001999],
    [-0.0039, -0.002299],
    [-0.005, -0.002899],
    [-0.0052, -0.002699],
    [-0.005, -0.002399],
    [-0.0049, -0.001899],
    [-0.0051, -0.001399],
    [-0.005, -0.001599],
    [-0.0043, -0.002399],
    [-0.0042, -0.002499],
    [-0.0041, -0.002599],
    [-0.003599, -0.002599],
    [-0.003, -0.002499],
    [-0.003, -0.002399],
    [-0.0035, -0.002099],
    [-0.003599, -0.002499],
    [-0.0018, -0.002099],
    [-0.0007, -0.001899],
    [-0.0006, -0.001999],
    [-0.0002, -0.001899],
    [0.000299, -0.002399],
    [-0.0001, -0.002499],
    [-0.0009, -0.002699],
    [0, -0.003099],
    [0.000099, -0.003399],
    [-0.0016, -0.003599],
    [-0.0024, -0.003399],
    [-0.002199, -0.003099],
    [-0.0017, -0.002299],
    [-0.0021, -0.001899],
    [-0.0019, -0.002799],
    [-0.0009, -0.003599],
    [-0.0013, -0.003699],
    [-0.0015, -0.003499],
    [-0.001099, -0.003499],
    [-0.0009, -0.003499],
    [-0.0016, -0.003799],
    [-0.0024, -0.004099],
    [-0.0018, -0.004699],
    [-0.0002, -0.004199],
    [0.000499, -0.003399],
    [0.000699, -0.003299],
    [0.001099, -0.003899],
    [0.001099, -0.004699],
    [0.000899, -0.004899],
    [0.001099, -0.004699],
    [0.001199, -0.004499],
    [0.001099, -0.003899],
    [0.000099, -0.002999],
    [-0.001399, -0.003299],
    [-0.0019, -0.003399],
    [-0.0017, -0.002799],
    [-0.0052, -0.001299],
    [-0.0061, -0.003999],
    [-0.0041, -0.007199],
    [-0.0037, -0.006599],
    [-0.0012, -0.005799],
    [-0.0013, -0.004599],
    [-0.002199, -0.004299],
    [-0.0028, -0.004199],
    [-0.0031, -0.004299],
    [-0.0027, -0.005399],
    [-0.0021, -0.005699],
    [-0.0017, -0.004999],
    [-0.002, -0.004499],
    [-0.0031, -0.004399],
    [-0.0032, -0.004599],
    [-0.0029, -0.004699],
    [-0.002499, -0.004399],
    [-0.0024, -0.003699],
    [-0.0027, -0.002499],
    [-0.0028, -0.002099],
    [-0.0038, -0.002099],
    [-0.0041, -0.002299],
    [-0.004399, -0.003299],
    [-0.005, -0.003399],
    [-0.0052, -0.003799],
    [-0.0057, -0.004499],
    [-0.0054, -0.005099],
    [-0.0058, -0.004799],
    [-0.0059, -0.005099],
    [-0.0056, -0.005399],
    [-0.005499, -0.004599],
    [-0.0043, -0.003099],
    [-0.0052, -0.002199],
    [-0.005, -0.000899],
    [-0.0045, -0.000999],
    [-0.0038, -0.001799],
    [-0.0031, -0.001299],
    [-0.0015, 0.0014],
    [-0.006599, 0.0006],
    [-0.0074, 0.0009],
    [-0.0047, 0.0001],
    [-0.0051, -0.000999],
    [-0.0054, -0.001299],
    [-0.005499, -0.001499],
    [-0.0053, -0.001299],
    [-0.0052, -0.001599],
    [-0.0051, -0.001599],
    [-0.0047, -0.001899],
    [-0.0049, -0.002799],
    [-0.0054, -0.002799],
    [-0.0052, -0.002699],
    [-0.0047, -0.002499],
    [-0.0042, -0.001899],
    [-0.0041, -0.001899],
    [-0.0042, -0.002199],
    [-0.0041, -0.002399],
    [-0.0032, -0.002699],
    [-0.0026, -0.002799],
    [-0.0024, -0.002699],
    [-0.0019, -0.003199],
    [-0.001399, -0.003099],
    [-0.0019, -0.003199],
    [-0.002, -0.003899],
    [-0.0012, -0.003799],
    [-0.0009, -0.003599],
    [-0.002, -0.003299],
    [-0.0028, -0.003099],
    [-0.0031, -0.001799],
    [-0.0027, -0.001199],
    [-0.0024, -0.001199],
    [-0.002199, -0.002399],
    [-0.0024, -0.002599],
    [-0.0024, -0.002899],
    [-0.0024, -0.003199],
    [-0.0018, -0.003299],
    [-0.0007, -0.003599],
    [-0.001099, -0.004999],
    [-0.002, -0.005999],
    [-0.0019, -0.007399],
    [-0.0013, -0.007199],
    [-0.0013, -0.006799],
    [-0.0016, -0.006799],
    [-0.0016, -0.007299],
    [-0.0018, -0.007099],
    [-0.0019, -0.007699],
    [-0.0013, -0.007599],
    [-0.0009, -0.007099],
    [-0.0012, -0.005799],
    [-0.0013, -0.005099],
    [-0.0018, -0.004999],
    [-0.0021, -0.004199],
    [-0.002, -0.004299],
    [-0.0027, -0.006099],
    [-0.0032, -0.006299],
    [-0.003299, -0.006699],
    [-0.0031, -0.006799],
    [-0.0031, -0.006799],
    [-0.0031, -0.006299],
    [-0.003, -0.006599],
    [-0.0035, -0.006799],
    [-0.0037, -0.006399],
    [-0.0027, -0.005799],
    [-0.002499, -0.005199],
    [-0.0027, -0.004499],
    [-0.003599, -0.003699],
    [-0.0041, -0.003999],
    [-0.0043, -0.004299],
    [-0.0037, -0.004399],
    [-0.0034, -0.004699],
    [-0.0034, -0.004599],
    [-0.003, -0.003799],
    [-0.0028, -0.003599],
    [-0.003599, -0.003099],
    [-0.0038, -0.003899],
    [-0.0039, -0.004799],
    [-0.0041, -0.005499],
    [-0.0042, -0.005799],
    [-0.0047, -0.005699],
    [-0.0047, -0.005599],
    [-0.0051, -0.005499],
    [-0.005499, -0.004999],
    [-0.0053, -0.004799],
    [-0.005499, -0.003799],
    [-0.0052, -0.003799],
    [-0.0051, -0.003699],
    [-0.0047, -0.003099],
    [-0.005, -0.002599],
    [-0.0058, -0.002599],
    [-0.0058, -0.002599],
    [-0.0059, -0.002999],
    [-0.0054, -0.003399],
    [-0.0047, -0.004399],
    [-0.0041, -0.003999],
    [-0.0038, -0.003499],
    [-0.0047, -0.002699],
    [-0.005499, -0.001899],
    [-0.005, -0.001999],
    [-0.0049, -0.001899],
    [-0.0053, -0.001399],
    [-0.005499, -0.001099],
    [-0.0053, -0.000699],
    [-0.0053, -0.000699],
    [-0.0058, -0.000199],
    [-0.0056, -0.000599],
    [-0.0047, -0.001799],
    [-0.0041, -0.002099],
    [-0.0043, -0.002199],
    [-0.0037, -0.001999],
    [-0.0029, -0.001899],
    [-0.0032, -0.002099],
    [-0.0035, -0.002299],
    [-0.0028, -0.002299],
    [-0.0012, -0.002599],
    [-0.0004, -0.003199],
    [-0.000299, -0.003199],
    [0.000299, -0.003699],
    [0.001199, -0.003899],
    [0.000399, -0.003299],
    [0, -0.003299],
    [0.000699, -0.003199],
    [-0.0001, -0.002699],
    [-0.0016, -0.002099],
    [-0.0018, -0.001399],
    [-0.0016, -0.001099],
    [-0.001099, -0.000099],
    [-0.0018, -0.000099],
    [-0.0015, -0.001699],
    [-0.0012, -0.002099],
    [-0.002, -0.001999],
    [-0.0019, -0.002099],
    [-0.0012, -0.002399],
    [-0.0013, -0.002899],
    [-0.0021, -0.003199],
    [-0.0029, -0.003299],
    [-0.002, -0.004199],
    [-0.0005, -0.003999],
    [-0.0004, -0.003699],
    [-0.0004, -0.004099],
    [-0.000299, -0.004799],
    [-0.0005, -0.005099],
    [-0.0007, -0.004999],
    [-0.000299, -0.004599],
    [0.000399, -0.004399],
    [0.000399, -0.004399],
    [0.000599, -0.004199],
    [-0.0015, -0.003899],
    [-0.0016, -0.003499],
    [-0.0015, -0.003899],
    [-0.0084, -0.000999],
    [-0.0046, -0.007699],
    [-0.0056, -0.007899],
    [-0.004399, -0.006999],
    [-0.0021, -0.005599],
    [-0.0028, -0.005399],
    [-0.003599, -0.005499],
    [-0.0042, -0.006299],
    [0.014399, -0.018599],
    [0.0052, -0.010799],
    [0.002199, -0.007599],
    [0.000599, -0.005699],
    [-0.000299, -0.005199],
    [-0.0009, -0.005199],
    [-0.001099, -0.004999],
    [-0.0012, -0.004899],
    [-0.0012, -0.004899]
];
export default {
    components: {},
    data () {
        return {
            sensorArr: [
                {
                    type: 'heapDisplacement',
                    name: '累计位移'
                }, {
                    type: 'displacementSpeed',
                    name: '位移速度'
                },
                {
                    type: 'acceleratedSpeed',
                    name: '加速度'
                },
                {
                    type: 'horizontalDistribution',
                    name: '水平散点分布'
                },
                {
                    type: 'spaceDistribution',
                    name: '空间坐标分布'
                }
            ],
            activeIndex: 'heapDisplacement',
            pickerOptions: {
                shortcuts: [
                    {
                        text: '最近一周',
                        onClick (picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
                            picker.$emit('pick', [start, end]);
                        }
                    }, {
                        text: '最近一个月',
                        onClick (picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                            picker.$emit('pick', [start, end]);
                        }
                    }, {
                        text: '最近三个月',
                        onClick (picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                            picker.$emit('pick', [start, end]);
                        }
                    }
                ]
            },
            value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],//设置默认时间
            value2: '',
            value3: '',
            buttonIndex: 'accordingDay',
            optionsGroup: [
                {
                    backgroundColor: 'transparent',
                    textStyle: {
                        fontSize: 12,
                        fontFamily: 'PingFang',
                        fontWeight: 600,
                        color: '#1E2C41'
                    },
                    title: [
                        {
                            text: '空间偏移量： 三维空间XYH的位移偏移量 水平偏移量： 平面XY方位的位移偏移量 沉降： 垂直H方位的位移偏移量',
                            textStyle: {
                                fontSize: 12,
                                fontWeight: 400,
                                fontFamily: 'PingFang'
                            },
                            top: 62,
                            left: 400,
                            backgroundColor: 'rgba(0,123,255,0.1)'
                        }
                        // {
                        //     text: '上一次数据刷新时间： 2020-06-21 16:37:18',
                        //     textAlign: 'center',
                        //     textStyle: {
                        //         fontSize: 12
                        //     },
                        //     top: 10,
                        //     right: 0
                        // }
                    ],
                    legend: {
                        icon: 'circle',
                        top: 28,
                        left: 400,
                        itemWidth: 6,
                        itemGap: 20,
                        textStyle: {
                            color: '#556677'
                        }
                    },
                    'tooltip': {
                        'trigger': 'axis',
                        'axisPointer': {
                            'type': 'none',
                            textStyle: {
                                color: '#fff',
                                fontSize: 12
                            }

                        },
                        formatter: '{b}日  {a0}:{c0}',
                        backgroundColor: 'rgba(0,123,255,1)'
                    },
                    'grid': {
                        'borderWidth': 0,
                        'top': 100,
                        left: 50,
                        right: 20,
                        'bottom': 100,
                        textStyle: {
                            color: '#fff'
                        }
                    },
                    'calculable': true,
                    dataZoom: [
                        {
                            show: true,
                            realtime: true,
                            bottom: 0,
                            height: 32,
                            start: 30,
                            end: 60,
                            backgroundColor: 'rgba(19,114,255,0.2)',
                            borderColor: 'transparent',
                            fillerColor: 'rgba(19,114,255,0.2)',
                            handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
                            handleSize: '80%',
                            handleStyle: {
                                color: '#fff',
                                shadowBlur: 3,
                                shadowColor: 'rgba(0, 0, 0, 0.6)',
                                shadowOffsetX: 2,
                                shadowOffsetY: 2
                            },
                            borderRadius: 5,
                            textStyle: {
                                height: '10px'
                            }
                        },
                        {
                            type: 'inside',
                            realtime: true,
                            start: 0,
                            end: 60
                        }
                    ],
                    'xAxis': [
                        {
                            'type': 'category',
                            'axisLine': {
                                lineStyle: {
                                    color: '#A5BFE2',
                                    width: 1
                                }
                            },
                            'splitLine': {
                                'show': false
                            },
                            'axisTick': {
                                'show': false
                            },
                            'splitArea': {
                                'show': false
                            },
                            'axisLabel': {
                                'interval': 0,
                                formatter: function (value, index) {
                                    // 格式化成月/日，只在第一个刻度显示年份
                                    return '2020-04-0' + index + '日' + '\n' + '12:30:0' + index;
                                }
                            },
                            'data': xData
                        }
                    ],
                    'yAxis': [
                        {
                            'type': 'value',
                            'splitLine': {
                                'show': true,
                                lineStyle: {
                                    color: 'rgba(165,191,226,0.2)'
                                }
                            },
                            'axisLine': {
                                'show': false
                            },
                            'axisTick': {
                                'show': false
                            },
                            'axisLabel': {
                                'interval': 0,
                                align: 'left',
                                inside: false,
                                formatter: function (value, index) {
                                    // 格式化成月/日，只在第一个刻度显示年份
                                    return value;
                                }

                            },
                            offset: 20,
                            'splitArea': {
                                'show': false
                            }

                        }
                    ],
                    'series': [
                        {
                            'name': '空间偏移值',
                            'type': 'line',
                            symbolSize: 10,
                            symbol: 'circle',
                            showSymbol: true,
                            'itemStyle': {
                                'normal': {
                                    'color': 'rgba(0,123,255,1)',
                                    'barBorderRadius': 1,
                                    borderWidth: 1,
                                    borderColor: 'white',
                                    areaStyle: {
                                        //color: '#94C9EC'
                                        color: {
                                            x1: 0,
                                            y1: 0,
                                            x2: 0,
                                            y2: 1,
                                            colorStops: [
                                                {
                                                    offset: 0,
                                                    color: 'rgba(0,94,255,0.3)' // 0% 处的颜色
                                                }, {
                                                    offset: 1,
                                                    color: 'rgba(0,123,255,0)' // 100% 处的颜色
                                                }
                                            ]
                                        }
                                    }

                                }
                            },
                            lineStyle: {
                                normal: {
                                    width: 2,
                                    color: '#007BFF'
                                }
                            },
                            'data': shuffle(datadd),
                            smooth: true
                        },
                        {
                            'name': '水平偏移值',
                            'type': 'line',
                            symbolSize: 10,
                            symbol: 'circle',
                            showSymbol: true,
                            'itemStyle': {
                                'normal': {
                                    'color': 'rgba(78,0,255,1)',
                                    'barBorderRadius': 1,
                                    borderWidth: 1,
                                    borderColor: 'white',
                                    areaStyle: {
                                        //color: '#94C9EC'
                                        color: {
                                            x1: 0,
                                            y1: 0,
                                            x2: 0,
                                            y2: 1,
                                            colorStops: [
                                                {
                                                    offset: 0,
                                                    color: 'rgba(0,94,255,0.3)' // 0% 处的颜色
                                                }, {
                                                    offset: 1,
                                                    color: 'rgba(0,123,255,0)' // 100% 处的颜色
                                                }
                                            ]
                                        }
                                    }

                                }
                            },
                            lineStyle: {
                                normal: {
                                    width: 2,
                                    color: 'rgba(78,0,255,1)'
                                }
                            },
                            'data': shuffle(datadd),
                            smooth: true
                        },
                        {
                            'name': '沉降',
                            'type': 'line',
                            symbolSize: 10,
                            symbol: 'circle',
                            showSymbol: true,
                            'itemStyle': {
                                'normal': {
                                    'color': 'rgba(0,189,153,1)',
                                    'barBorderRadius': 1,
                                    borderWidth: 1,
                                    borderColor: 'white',
                                    areaStyle: {
                                        //color: '#94C9EC'
                                        color: {
                                            x1: 0,
                                            y1: 0,
                                            x2: 0,
                                            y2: 1,
                                            colorStops: [
                                                {
                                                    offset: 0,
                                                    color: 'rgba(0,94,255,0.3)' // 0% 处的颜色
                                                }, {
                                                    offset: 1,
                                                    color: 'rgba(0,123,255,0)' // 100% 处的颜色
                                                }
                                            ]
                                        }
                                    }

                                }
                            },
                            lineStyle: {
                                normal: {
                                    width: 2,
                                    color: 'rgba(0,189,153,1)'
                                }
                            },
                            'data': shuffle(datadd),
                            smooth: true
                        }
                    ]
                },
                {
                    backgroundColor: 'transparent',
                    textStyle: {
                        fontSize: 12,
                        fontFamily: 'PingFang',
                        fontWeight: 600,
                        color: '#1E2C41'
                    },
                    title: [
                        {
                            text: 'X： -X西/X东 Y：-Y南/Y北 H：沉降',
                            textStyle: {
                                fontSize: 12,
                                fontWeight: 400,
                                fontFamily: 'PingFang'
                            },
                            top: 28,
                            left: 550,
                            backgroundColor: 'rgba(0,123,255,0.1)'
                        }
                        // {
                        //     text: '上一次数据刷新时间： 2020-06-21 16:37:18',
                        //     textAlign: 'center',
                        //     textStyle: {
                        //         fontSize: 12
                        //     },
                        //     top: 10,
                        //     right: 0
                        // }
                    ],
                    legend: {
                        icon: 'circle',
                        top: 28,
                        left: 400,
                        itemWidth: 6,
                        itemGap: 20,
                        textStyle: {
                            color: '#556677'
                        }
                    },
                    'tooltip': {
                        'trigger': 'axis',
                        'axisPointer': {
                            'type': 'none',
                            textStyle: {
                                color: '#fff',
                                fontSize: 12
                            }

                        },
                        formatter: '{b}日  {a0}:{c0}',
                        backgroundColor: 'rgba(0,123,255,1)'
                    },
                    'grid': {
                        'borderWidth': 0,
                        'top': 100,
                        left: 50,
                        right: 20,
                        'bottom': 100,
                        textStyle: {
                            color: '#fff'
                        }
                    },
                    'calculable': true,
                    dataZoom: [
                        {
                            show: true,
                            realtime: true,
                            bottom: 0,
                            height: 32,
                            start: 30,
                            end: 60,
                            backgroundColor: 'rgba(19,114,255,0.2)',
                            borderColor: 'transparent',
                            fillerColor: 'rgba(19,114,255,0.2)',
                            handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
                            handleSize: '80%',
                            handleStyle: {
                                color: '#fff',
                                shadowBlur: 3,
                                shadowColor: 'rgba(0, 0, 0, 0.6)',
                                shadowOffsetX: 2,
                                shadowOffsetY: 2
                            },
                            borderRadius: 5,
                            textStyle: {
                                height: '10px'
                            }
                        },
                        {
                            type: 'inside',
                            realtime: true,
                            start: 0,
                            end: 60
                        }
                    ],
                    'xAxis': [
                        {
                            'type': 'category',
                            'axisLine': {
                                lineStyle: {
                                    color: '#A5BFE2',
                                    width: 1
                                }
                            },
                            'splitLine': {
                                'show': false
                            },
                            'axisTick': {
                                'show': false
                            },
                            'splitArea': {
                                'show': false
                            },
                            'axisLabel': {
                                'interval': 0,
                                formatter: function (value, index) {
                                    // 格式化成月/日，只在第一个刻度显示年份
                                    return '2020-04-0' + index + '日' + '\n' + '12:30:0' + index;
                                }
                            },
                            'data': xData
                        }
                    ],
                    'yAxis': [
                        {
                            'type': 'value',
                            'splitLine': {
                                'show': true,
                                lineStyle: {
                                    color: 'rgba(165,191,226,0.2)'
                                }
                            },
                            'axisLine': {
                                'show': false
                            },
                            'axisTick': {
                                'show': false
                            },
                            'axisLabel': {
                                'interval': 0,
                                align: 'left',
                                inside: false,
                                formatter: function (value, index) {
                                    // 格式化成月/日，只在第一个刻度显示年份
                                    return value;
                                }

                            },
                            offset: 20,
                            'splitArea': {
                                'show': false
                            }

                        }
                    ],
                    'series': [
                        {
                            'name': 'X',
                            'type': 'line',
                            symbolSize: 10,
                            symbol: 'circle',
                            showSymbol: true,
                            'itemStyle': {
                                'normal': {
                                    'color': 'rgba(0,123,255,1)',
                                    'barBorderRadius': 1,
                                    borderWidth: 1,
                                    borderColor: 'white',
                                    areaStyle: {
                                        //color: '#94C9EC'
                                        color: {
                                            x1: 0,
                                            y1: 0,
                                            x2: 0,
                                            y2: 1,
                                            colorStops: [
                                                {
                                                    offset: 0,
                                                    color: 'rgba(0,94,255,0.3)' // 0% 处的颜色
                                                }, {
                                                    offset: 1,
                                                    color: 'rgba(0,123,255,0)' // 100% 处的颜色
                                                }
                                            ]
                                        }
                                    }

                                }
                            },
                            lineStyle: {
                                normal: {
                                    width: 2,
                                    color: '#007BFF'
                                }
                            },
                            'data': shuffle(datadd),
                            smooth: true
                        },
                        {
                            'name': 'Y',
                            'type': 'line',
                            symbolSize: 10,
                            symbol: 'circle',
                            showSymbol: true,
                            'itemStyle': {
                                'normal': {
                                    'color': 'rgba(78,0,255,1)',
                                    'barBorderRadius': 1,
                                    borderWidth: 1,
                                    borderColor: 'white',
                                    areaStyle: {
                                        //color: '#94C9EC'
                                        color: {
                                            x1: 0,
                                            y1: 0,
                                            x2: 0,
                                            y2: 1,
                                            colorStops: [
                                                {
                                                    offset: 0,
                                                    color: 'rgba(0,94,255,0.3)' // 0% 处的颜色
                                                }, {
                                                    offset: 1,
                                                    color: 'rgba(0,123,255,0)' // 100% 处的颜色
                                                }
                                            ]
                                        }
                                    }

                                }
                            },
                            lineStyle: {
                                normal: {
                                    width: 2,
                                    color: 'rgba(78,0,255,1)'
                                }
                            },
                            'data': shuffle(datadd),
                            smooth: true
                        },
                        {
                            'name': 'H',
                            'type': 'line',
                            symbolSize: 10,
                            symbol: 'circle',
                            showSymbol: true,
                            'itemStyle': {
                                'normal': {
                                    'color': 'rgba(0,189,153,1)',
                                    'barBorderRadius': 1,
                                    borderWidth: 1,
                                    borderColor: 'white',
                                    areaStyle: {
                                        //color: '#94C9EC'
                                        color: {
                                            x1: 0,
                                            y1: 0,
                                            x2: 0,
                                            y2: 1,
                                            colorStops: [
                                                {
                                                    offset: 0,
                                                    color: 'rgba(0,94,255,0.3)' // 0% 处的颜色
                                                }, {
                                                    offset: 1,
                                                    color: 'rgba(0,123,255,0)' // 100% 处的颜色
                                                }
                                            ]
                                        }
                                    }

                                }
                            },
                            lineStyle: {
                                normal: {
                                    width: 2,
                                    color: 'rgba(0,189,153,1)'
                                }
                            },
                            'data': shuffle(datadd),
                            smooth: true
                        }
                    ]
                },
                {
                    backgroundColor: 'transparent',
                    textStyle: {
                        fontSize: 12,
                        fontFamily: 'PingFang',
                        fontWeight: 600,
                        color: '#1E2C41'
                    },
                    title: [
                        {
                            text: '空间偏移量： 三维空间XYH的位移偏移量 水平偏移量： 平面XY方位的位移偏移量 沉降： 垂直H方位的位移偏移量',
                            textStyle: {
                                fontSize: 12,
                                fontWeight: 400,
                                fontFamily: 'PingFang'
                            },
                            top: 62,
                            left: 400,
                            backgroundColor: 'rgba(0,123,255,0.1)'
                        }
                        // {
                        //     text: '上一次数据刷新时间： 2020-06-21 16:37:18',
                        //     textAlign: 'center',
                        //     textStyle: {
                        //         fontSize: 12
                        //     },
                        //     top: 10,
                        //     right: 0
                        // }
                    ],
                    legend: {
                        icon: 'circle',
                        top: 28,
                        left: 400,
                        itemWidth: 6,
                        itemGap: 20,
                        textStyle: {
                            color: '#556677'
                        }
                    },
                    'tooltip': {
                        'trigger': 'axis',
                        'axisPointer': {
                            'type': 'none',
                            textStyle: {
                                color: '#fff',
                                fontSize: 12
                            }

                        },
                        formatter: '{b}日  {a0}:{c0}',
                        backgroundColor: 'rgba(0,123,255,1)'
                    },
                    'grid': {
                        'borderWidth': 0,
                        'top': 100,
                        left: 50,
                        right: 20,
                        'bottom': 100,
                        textStyle: {
                            color: '#fff'
                        }
                    },
                    'calculable': true,
                    dataZoom: [
                        {
                            show: true,
                            realtime: true,
                            bottom: 0,
                            height: 32,
                            start: 30,
                            end: 60,
                            backgroundColor: 'rgba(19,114,255,0.2)',
                            borderColor: 'transparent',
                            fillerColor: 'rgba(19,114,255,0.2)',
                            handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
                            handleSize: '80%',
                            handleStyle: {
                                color: '#fff',
                                shadowBlur: 3,
                                shadowColor: 'rgba(0, 0, 0, 0.6)',
                                shadowOffsetX: 2,
                                shadowOffsetY: 2
                            },
                            borderRadius: 5,
                            textStyle: {
                                height: '10px'
                            }
                        },
                        {
                            type: 'inside',
                            realtime: true,
                            start: 0,
                            end: 60
                        }
                    ],
                    'xAxis': [
                        {
                            'type': 'category',
                            'axisLine': {
                                lineStyle: {
                                    color: '#A5BFE2',
                                    width: 1
                                }
                            },
                            'splitLine': {
                                'show': false
                            },
                            'axisTick': {
                                'show': false
                            },
                            'splitArea': {
                                'show': false
                            },
                            'axisLabel': {
                                'interval': 0,
                                formatter: function (value, index) {
                                    // 格式化成月/日，只在第一个刻度显示年份
                                    return '2020-04-0' + index + '日' + '\n' + '12:30:0' + index;
                                }
                            },
                            'data': xData
                        }
                    ],
                    'yAxis': [
                        {
                            'type': 'value',
                            'splitLine': {
                                'show': true,
                                lineStyle: {
                                    color: 'rgba(165,191,226,0.2)'
                                }
                            },
                            'axisLine': {
                                'show': false
                            },
                            'axisTick': {
                                'show': false
                            },
                            'axisLabel': {
                                'interval': 0,
                                align: 'left',
                                inside: false,
                                formatter: function (value, index) {
                                    // 格式化成月/日，只在第一个刻度显示年份
                                    return value;
                                }

                            },
                            offset: 20,
                            'splitArea': {
                                'show': false
                            }

                        }
                    ],
                    'series': [
                        {
                            'name': '空间偏移值',
                            'type': 'line',
                            symbolSize: 10,
                            symbol: 'circle',
                            showSymbol: true,
                            'itemStyle': {
                                'normal': {
                                    'color': 'rgba(0,123,255,1)',
                                    'barBorderRadius': 1,
                                    borderWidth: 1,
                                    borderColor: 'white',
                                    areaStyle: {
                                        //color: '#94C9EC'
                                        color: {
                                            x1: 0,
                                            y1: 0,
                                            x2: 0,
                                            y2: 1,
                                            colorStops: [
                                                {
                                                    offset: 0,
                                                    color: 'rgba(0,94,255,0.3)' // 0% 处的颜色
                                                }, {
                                                    offset: 1,
                                                    color: 'rgba(0,123,255,0)' // 100% 处的颜色
                                                }
                                            ]
                                        }
                                    }

                                }
                            },
                            lineStyle: {
                                normal: {
                                    width: 2,
                                    color: '#007BFF'
                                }
                            },
                            'data': shuffle(datadd),
                            smooth: true
                        },
                        {
                            'name': '水平偏移值',
                            'type': 'line',
                            symbolSize: 10,
                            symbol: 'circle',
                            showSymbol: true,
                            'itemStyle': {
                                'normal': {
                                    'color': 'rgba(78,0,255,1)',
                                    'barBorderRadius': 1,
                                    borderWidth: 1,
                                    borderColor: 'white',
                                    areaStyle: {
                                        //color: '#94C9EC'
                                        color: {
                                            x1: 0,
                                            y1: 0,
                                            x2: 0,
                                            y2: 1,
                                            colorStops: [
                                                {
                                                    offset: 0,
                                                    color: 'rgba(0,94,255,0.3)' // 0% 处的颜色
                                                }, {
                                                    offset: 1,
                                                    color: 'rgba(0,123,255,0)' // 100% 处的颜色
                                                }
                                            ]
                                        }
                                    }

                                }
                            },
                            lineStyle: {
                                normal: {
                                    width: 2,
                                    color: 'rgba(78,0,255,1)'
                                }
                            },
                            'data': shuffle(datadd),
                            smooth: true
                        },
                        {
                            'name': '沉降',
                            'type': 'line',
                            symbolSize: 10,
                            symbol: 'circle',
                            showSymbol: true,
                            'itemStyle': {
                                'normal': {
                                    'color': 'rgba(0,189,153,1)',
                                    'barBorderRadius': 1,
                                    borderWidth: 1,
                                    borderColor: 'white',
                                    areaStyle: {
                                        //color: '#94C9EC'
                                        color: {
                                            x1: 0,
                                            y1: 0,
                                            x2: 0,
                                            y2: 1,
                                            colorStops: [
                                                {
                                                    offset: 0,
                                                    color: 'rgba(0,94,255,0.3)' // 0% 处的颜色
                                                }, {
                                                    offset: 1,
                                                    color: 'rgba(0,123,255,0)' // 100% 处的颜色
                                                }
                                            ]
                                        }
                                    }

                                }
                            },
                            lineStyle: {
                                normal: {
                                    width: 2,
                                    color: 'rgba(0,189,153,1)'
                                }
                            },
                            'data': shuffle(datadd),
                            smooth: true
                        }
                    ]
                },
                {
                    backgroundColor: 'white',
                    borderColor: 'rgba(165,191,226,1)',
                    borderWidth: 1,
                    tooltip: {
                        formatter: function (params) {
                            console.log(params);
                            return 'X : ' + params.data[0] + '<br>Y : ' + params.data[1];
                        },
                        textStyle: {
                            fontSize: fSize
                        }
                    },
                    legend: {
                        orient: 'horizontal',
                        x: 'center',
                        y: '3%',
                        itemWidth: 12,
                        itemHeight: 12,
                        icon: 'circle',
                        selectedMode: true,
                        textStyle: {
                            color: color, // 图例文字颜色
                            fontSize: fSize
                        },
                        data: ['起始点', '结束点']
                    },
                    grid: {
                        left: 100,
                        right: 100,
                        bottom: 100,
                        top: 100,
                        containLabel: false
                    },
                    xAxis: [
                        {
                            axisLabel: {
                                inside: false,

                                textStyle: {
                                    color: color,
                                    fontSize: fSize,
                                    padding:20,

                                }
                            },
                            nameTextStyle: {
                                color: color,
                                fontSize: fSize
                            },

                            axisTick: {
                                show: false,
                                lineStyle: {
                                    color: color
                                }
                            },
                            axisLine: {
                                lineStyle: {
                                    color: 'rgba(0,123,255,1)',
                                    width: 2
                                }
                            },
                            splitLine: {
                                show: false,
                                lineStyle: {
                                    color: 'rgba(80,224,255,0.3)',
                                    type: 'dashed'
                                }
                            },
                            name: '负损值'
                        },
                        // {
                        //     axisLabel: {
                        //         show: false,
                        //         textStyle: {
                        //             color: color,
                        //             fontSize: fSize
                        //         }
                        //     },
                        //     min: '-0.005',
                        //     max: '-0.005',
                        //     axisTick: {
                        //         show: false,
                        //         lineStyle: {
                        //             color: color
                        //         }
                        //     },
                        //     axisLine: {
                        //         lineStyle: {
                        //             color: 'rgba(165,191,226,1)',
                        //             width: 2
                        //         }
                        //     },
                        //     splitLine: {
                        //         show: false
                        //     },
                        //     position: 'top',
                        //     silent: true
                        // },
                        // {
                        //     min: '0.025',
                        //     max: '0.025',
                        //     position: 'bottom',
                        //     axisLabel: {
                        //         show: false,
                        //         textStyle: {
                        //             color: color,
                        //             fontSize: fSize
                        //         }
                        //     },
                        //     axisTick: {
                        //         show: false,
                        //         lineStyle: {
                        //             color: color
                        //         }
                        //     },
                        //     axisLine: {
                        //         lineStyle: {
                        //             color: 'rgba(165,191,226,1)',
                        //             width: 2
                        //         }
                        //     },
                        //     splitLine: {
                        //         show: false
                        //     },
                        //     silent: true
                        // }

                    ],
                    yAxis: [
                        {
                            axisLabel: {
                                textStyle: {
                                    color: color,
                                    fontSize: fSize,
                                    padding:20
                                },

                            },

                            axisTick: {
                                show: false,
                                lineStyle: {
                                    color: color
                                }
                            },
                            axisLine: {
                                lineStyle: {
                                    color: 'rgba(0,123,255,1)',
                                    width: 2
                                }
                            },
                            splitLine: {
                                show: true,
                                lineStyle: {
                                    color: 'rgba(165,191,226,0.3)',
                                    type: 'solid'
                                }
                            },
                            name: '负损提升',
                            nameTextStyle: {
                                color: color,
                                fontSize: fSize
                            }
                        },
                        // {
                        //     position: 'right',
                        //     min: '-0.025',
                        //     max: '-0.025',
                        //     axisLabel: {
                        //         show: false,
                        //         textStyle: {
                        //             color: color,
                        //             fontSize: fSize
                        //         }
                        //     },
                        //     axisTick: {
                        //         show: false,
                        //         lineStyle: {
                        //             color: color
                        //         }
                        //     },
                        //     axisLine: {
                        //         lineStyle: {
                        //             color: 'rgba(165,191,226,1)',
                        //             width: 2
                        //         }
                        //     },
                        //
                        //     splitLine: {
                        //         show: false
                        //     },
                        //     silent: true
                        // },
                        // {
                        //     position: 'left',
                        //     min: '0.01',
                        //     max: '0.01',
                        //     axisLabel: {
                        //         show: false,
                        //         textStyle: {
                        //             color: color,
                        //             fontSize: fSize
                        //         }
                        //     },
                        //     axisTick: {
                        //         show: false,
                        //         lineStyle: {
                        //             color: color
                        //         }
                        //     },
                        //     axisLine: {
                        //         lineStyle: {
                        //             color: 'rgba(165,191,226,1)',
                        //             width: 2
                        //         }
                        //     },
                        //     splitLine: {
                        //         show: false
                        //     },
                        //     silent: true
                        // }

                    ],
                    visualMap: {
                        show: false,
                        max: 100,
                        inRange: {
                            symbolSize: [18, 18]
                        }
                    },
                    series: [
                        {
                            type: 'scatter',
                            itemStyle: {
                                color: 'rgba(0,123,255,0.3)',
                                borderColor: 'white',
                                borderWidth: 1
                            },
                            data: scatterData
                        },
                        {
                            name: '起始点',
                            type: 'scatter',
                            itemStyle: {
                                color: 'rgba(8,33,85,1)',
                                borderColor: 'white',
                                borderWidth: 1
                            },
                            data: [
                                [-0.0041, -0.002399]
                            ]
                        },
                        {
                            name: '结束点',
                            type: 'scatter',
                            itemStyle: {
                                color: 'rgba(255,94,84,1)',
                                borderColor: 'white',
                                borderWidth: 1
                            },
                            data: [
                                [-0.0012, -0.004899]
                            ]
                        }
                    ],
                },
                {
                    backgroundColor: 'transparent',
                    textStyle: {
                        fontSize: 12,
                        fontFamily: 'PingFang',
                        fontWeight: 600,
                        color: '#1E2C41'
                    },
                    title: [
                        {
                            text: '空间偏移量： 三维空间XYH的位移偏移量 水平偏移量： 平面XY方位的位移偏移量 沉降： 垂直H方位的位移偏移量',
                            textStyle: {
                                fontSize: 12,
                                fontWeight: 400,
                                fontFamily: 'PingFang'
                            },
                            top: 62,
                            left: 400,
                            backgroundColor: 'rgba(0,123,255,0.1)'
                        }
                        // {
                        //     text: '上一次数据刷新时间： 2020-06-21 16:37:18',
                        //     textAlign: 'center',
                        //     textStyle: {
                        //         fontSize: 12
                        //     },
                        //     top: 10,
                        //     right: 0
                        // }
                    ],
                    legend: {
                        icon: 'circle',
                        top: 28,
                        left: 400,
                        itemWidth: 6,
                        itemGap: 20,
                        textStyle: {
                            color: '#556677'
                        }
                    },
                    'tooltip': {
                        'trigger': 'axis',
                        'axisPointer': {
                            'type': 'none',
                            textStyle: {
                                color: '#fff',
                                fontSize: 12
                            }

                        },
                        formatter: '{b}日  {a0}:{c0}',
                        backgroundColor: 'rgba(0,123,255,1)'
                    },
                    'grid': {
                        'borderWidth': 0,
                        'top': 100,
                        left: 50,
                        right: 20,
                        'bottom': 100,
                        textStyle: {
                            color: '#fff'
                        }
                    },
                    'calculable': true,
                    dataZoom: [
                        {
                            show: true,
                            realtime: true,
                            bottom: 0,
                            height: 32,
                            start: 30,
                            end: 60,
                            backgroundColor: 'rgba(19,114,255,0.2)',
                            borderColor: 'transparent',
                            fillerColor: 'rgba(19,114,255,0.2)',
                            handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
                            handleSize: '80%',
                            handleStyle: {
                                color: '#fff',
                                shadowBlur: 3,
                                shadowColor: 'rgba(0, 0, 0, 0.6)',
                                shadowOffsetX: 2,
                                shadowOffsetY: 2
                            },
                            borderRadius: 5,
                            textStyle: {
                                height: '10px'
                            }
                        },
                        {
                            type: 'inside',
                            realtime: true,
                            start: 0,
                            end: 60
                        }
                    ],
                    'xAxis': [
                        {
                            'type': 'category',
                            'axisLine': {
                                lineStyle: {
                                    color: '#A5BFE2',
                                    width: 1
                                }
                            },
                            'splitLine': {
                                'show': false
                            },
                            'axisTick': {
                                'show': false
                            },
                            'splitArea': {
                                'show': false
                            },
                            'axisLabel': {
                                'interval': 0,
                                formatter: function (value, index) {
                                    // 格式化成月/日，只在第一个刻度显示年份
                                    return '2020-04-0' + index + '日' + '\n' + '12:30:0' + index;
                                }
                            },
                            'data': xData
                        }
                    ],
                    'yAxis': [
                        {
                            'type': 'value',
                            'splitLine': {
                                'show': true,
                                lineStyle: {
                                    color: 'rgba(165,191,226,0.2)'
                                }
                            },
                            'axisLine': {
                                'show': false
                            },
                            'axisTick': {
                                'show': false
                            },
                            'axisLabel': {
                                'interval': 0,
                                align: 'left',
                                inside: false,
                                formatter: function (value, index) {
                                    // 格式化成月/日，只在第一个刻度显示年份
                                    return value;
                                }

                            },
                            offset: 20,
                            'splitArea': {
                                'show': false
                            }

                        }
                    ],
                    'series': [
                        {
                            'name': '空间偏移值',
                            'type': 'line',
                            symbolSize: 10,
                            symbol: 'circle',
                            showSymbol: true,
                            'itemStyle': {
                                'normal': {
                                    'color': 'rgba(0,123,255,1)',
                                    'barBorderRadius': 1,
                                    borderWidth: 1,
                                    borderColor: 'white',
                                    areaStyle: {
                                        //color: '#94C9EC'
                                        color: {
                                            x1: 0,
                                            y1: 0,
                                            x2: 0,
                                            y2: 1,
                                            colorStops: [
                                                {
                                                    offset: 0,
                                                    color: 'rgba(0,94,255,0.3)' // 0% 处的颜色
                                                }, {
                                                    offset: 1,
                                                    color: 'rgba(0,123,255,0)' // 100% 处的颜色
                                                }
                                            ]
                                        }
                                    }

                                }
                            },
                            lineStyle: {
                                normal: {
                                    width: 2,
                                    color: '#007BFF'
                                }
                            },
                            'data': shuffle(datadd),
                            smooth: true
                        },
                        {
                            'name': '水平偏移值',
                            'type': 'line',
                            symbolSize: 10,
                            symbol: 'circle',
                            showSymbol: true,
                            'itemStyle': {
                                'normal': {
                                    'color': 'rgba(78,0,255,1)',
                                    'barBorderRadius': 1,
                                    borderWidth: 1,
                                    borderColor: 'white',
                                    areaStyle: {
                                        //color: '#94C9EC'
                                        color: {
                                            x1: 0,
                                            y1: 0,
                                            x2: 0,
                                            y2: 1,
                                            colorStops: [
                                                {
                                                    offset: 0,
                                                    color: 'rgba(0,94,255,0.3)' // 0% 处的颜色
                                                }, {
                                                    offset: 1,
                                                    color: 'rgba(0,123,255,0)' // 100% 处的颜色
                                                }
                                            ]
                                        }
                                    }

                                }
                            },
                            lineStyle: {
                                normal: {
                                    width: 2,
                                    color: 'rgba(78,0,255,1)'
                                }
                            },
                            'data': shuffle(datadd),
                            smooth: true
                        },
                        {
                            'name': '沉降',
                            'type': 'line',
                            symbolSize: 10,
                            symbol: 'circle',
                            showSymbol: true,
                            'itemStyle': {
                                'normal': {
                                    'color': 'rgba(0,189,153,1)',
                                    'barBorderRadius': 1,
                                    borderWidth: 1,
                                    borderColor: 'white',
                                    areaStyle: {
                                        //color: '#94C9EC'
                                        color: {
                                            x1: 0,
                                            y1: 0,
                                            x2: 0,
                                            y2: 1,
                                            colorStops: [
                                                {
                                                    offset: 0,
                                                    color: 'rgba(0,94,255,0.3)' // 0% 处的颜色
                                                }, {
                                                    offset: 1,
                                                    color: 'rgba(0,123,255,0)' // 100% 处的颜色
                                                }
                                            ]
                                        }
                                    }

                                }
                            },
                            lineStyle: {
                                normal: {
                                    width: 2,
                                    color: 'rgba(0,189,153,1)'
                                }
                            },
                            'data': shuffle(datadd),
                            smooth: true
                        }
                    ]
                }
            ]
        };
    },
    methods: {
        dayTimeChange (type) {
            if (type === 'day') {
                this.buttonIndex = 'accordingDay';
            }
            else if (type === 'time') {
                this.buttonIndex = 'accordingTime';
            }
        },
        handleSelect (key, keyPath) {
            console.log(key, keyPath);
            this.activeIndex = keyPath[0];
            // this.updateChart(this.activeIndex);
        },
        updateChart (type) {
            // this.options.title[1].text =  '上一次数据刷新时间：' + moment().format('YYYY.MM.DD hh:mm:ss a')

            this.options.series[0].data = shuffle(datadd);
            this.options = cloneDeep(this.options);
            if (type === 'humidity') {
                this.options.title[0].text = '';
                this.options.yAxis[0].axisLabel.formatter = function (value, index) {
                    console.log(value, index);
                    // 格式化成月/日，只在第一个刻度显示年份
                    return value + '%';
                };
            }
            else if (type === 'temperature') {
                this.options.title[0].text = '';
                this.options.yAxis[0].axisLabel.formatter = function (value, index) {
                    console.log(value, index);
                    // 格式化成月/日，只在第一个刻度显示年份
                    return value + '℃';
                };
            }
            else {
                this.options.title[0].text = '浓度%LEL';

            }
        }
    }
};
</script>

<style lang="scss" scoped>
    .bei-dou-sensor-dialog {
        .el-menu-item {
            width: 120px;
            text-align: center;
            border-bottom: 4px solid rgba(0, 123, 255, 1);
            transform: translate(0, 1px);
            font-size: 16px;
        }
        .el-menu.el-menu--horizontal {
            border-bottom: 1px solid rgba(0, 123, 255, 0.4);

        }
        .bei-dou-sensor-chart-box {
            width: 100%;
            height: 613px;
            position: relative;
            .chart-box-head {
                height: 84px;
                width: 100%;
                padding: 20px 30px 0 27px;
                position: absolute;
                z-index: 100;
                .button-box {
                    display: flex;
                    > div {
                        width: 90px;
                        height: 32px;
                        line-height: 32px;
                        text-align: center;
                        border: 1px solid #007bff;
                        border-radius: 5px 0px 0px 5px;
                        background: white;
                        font-size: 12px;
                        font-family: PingFang;
                        font-weight: 600;
                        color: #082155;
                        &:hover {
                            opacity: 0.5;
                        }
                    }
                    > div:last-child {
                        border-radius: 0px 5px 5px 0px;
                    }
                    .active {
                        background: #007bff;
                    }
                }
            }
            .chart-container {
                width: 100%;
                height: 613px;
            }
        }
    }


</style>